package entity;

import com.learn.Mask;
import com.learn.MaskStrategy;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author: liyf
 * @create: 2025-02-11 22:27
 **/
//@Data
public class User implements Serializable {

    private Integer userId;

    @Mask(mask = MaskStrategy.USERNAME)
    private String username;

    private String password;

    private String email;

    private LocalDateTime createdAt;

    private List<Order> orders;

    public User() {
    }

    public User(Integer userId, String username, String password) {
        System.out.println("User.User");
        this.userId = userId;
        this.username = username;
        this.password = password;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public List<Order> getOrders() {
        return orders;
    }

    public void setOrders(List<Order> orders) {
        this.orders = orders;
    }
}
